<h2>Search</h2>
<form method="post">
Search: <input type="text" name="search" />
</form>

<?php if (isset($this->result)):?>
<h2>Search results for '<?php echo $this->search; ?>'</h2>
<ol>
<?php foreach ($this->result->query->search->p as $r): ?>
    <li>
        <a href="http://www.wikipedia.org/wiki/<?php echo $r['title']?>" target="_blank"><?php echo $r['title']?></a>
        <small><?php echo $r['snippet'];?></small>
    </li>
<?php endforeach; ?>
</ol>
<?php endif;?>
